package com.example.springbootmybatis.service;

import com.example.springbootmybatis.dao.UserDao;
import com.example.springbootmybatis.pojo.User;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @Authther: mrwu
 * @date:2021/3/26-03
 * @Description:com.example.springbootmybatis.service
 */
@Service
public class UserService {
//    Logger logger= LoggerFactory.getLogger(UserService.class);
    @Autowired
    private UserDao userDao;

    public List<User> getuser(){
        List<User> users = userDao.getUser();
//        logger.info(users.toString());
        System.out.println(users.toString());
        return  users ;
    }
}
